/**
 * Created with Intellij IDEA.
 * Description
 * User: wen
 * Date:2022-05-08
 * TIME:19:50
 */
public class person {
//    String name;
//    String country;
//    String address;
//    //构造方法
//    public person(String name, String country, String address){
//        this.name = name;
//        this.country = country;
//        this.address = address;
//    }
//
//    public static void main(String[] args) {
//        person p1 = new person("赵铁柱", "大清","八大胡同");
//        person p2 = new person("李小花", "大清","朝阳门");
//
//        //大清亡了
//        p1.country = "民国";
//        p2.country = "民国";
//
//        System.out.println(p1.country);
//        System.out.println(p2.country);
//    }

    String name;
    static String country = "大清";//它是共享的，
    String address;
    //构造方法
    public person(String name, String country, String address){
        this.name = name;
        this.country = country;
        this.address = address;
    }

    public static void main(String[] args) {
        person p1 = new person("赵铁柱", "大清","八大胡同");
        person p2 = new person("李小花", "大清","朝阳门");

        //大清亡了
        p1.country = "民国";
        p2.country = "民国";

        System.out.println(p1.country);
        System.out.println(p2.country);

        System.out.println("%+");
    }
}
